#ifndef _client_h
#define _client_h


class SSLClient
{
  public:

  SSLClient(const char* keyfile, const char* passw);
  ~SSLClient();

  bool Connect(const char* host, int port);

  int Read(void* buf, int len);
  int ReadUntilFull(void* buf, int len);
  int Write(const void* buf, int len);

  private:

  int sock;
  SSL* ssl;
  SSL_CTX *ctx;
};


int tcp_connect(const char *host,int port);
void check_cert(SSL *ssl, const char *host);

#endif

